package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	var wg sync.WaitGroup
	wg.Add(2)
	go func() {
		for i := 1; i < 1000; i++ {
			fmt.Println(i)
			time.Sleep(1)
		}
		wg.Done()
	}()

	go func() {
		for i := 1; i < 1000; i++ {
			fmt.Println("a")
			time.Sleep(1)
		}
		wg.Done()
	}()
	wg.Wait()

}
